package edu.zjut.hjg.saas.biz.model;

import java.util.Date;

import edu.zjut.hjg.saas.biz.meta.KindergartenMeta;
import edu.zjut.hjg.saas.biz.support.AppStatus;

public class Kindergarten {
    private Integer          id;
    private Tenant           tenant = new Tenant();
    private String           name;
    private String           introduction;
    private City             city   = new City();
    private AppStatus        status;
    private String           siteDomain;
    private Date             startDate;
    private Date             endDate;
    private Date             createTime;
    private Integer          visits;
    private KindergartenMeta meta;

    /**
     * @return 是否已经通过审核
     */
    public boolean isAudited() {
        return this.status == AppStatus.AUDITED;
    }

    /**
     * @return 是否未通过审核
     */
    public boolean isUnaudited() {
        return this.status == AppStatus.UNAUDITED;
    }

    /**
     * @return 是否被驳回申请
     */
    public boolean isRejected() {
        return this.status == AppStatus.REJECTED;
    }

    /**
     * @return 是否已经启用
     */
    public boolean isEnabled() {
        return this.status == AppStatus.ENABLED;
    }

    /**
     * @return 是否停用
     */
    public boolean isDisabled() {
        return this.status == AppStatus.DISABLED;
    }

    public KindergartenMeta getMeta() {
        return meta;
    }

    public void setMeta(KindergartenMeta meta) {
        this.meta = meta;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Tenant getTenant() {
        return tenant;
    }

    public void setTenant(Tenant tenant) {
        this.tenant = tenant;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public City getCity() {
        return city;
    }

    public void setCity(City city) {
        this.city = city;
    }

    public AppStatus getStatus() {
        return status;
    }

    public void setStatus(AppStatus status) {
        this.status = status;
    }

    public String getSiteDomain() {
        return siteDomain;
    }

    public void setSiteDomain(String siteDomain) {
        this.siteDomain = siteDomain;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getVisits() {
        return visits;
    }

    public void setVisits(Integer visits) {
        this.visits = visits;
    }

    @Override
    public String toString() {
        return "Kindergarten [city=" + city + ", createTime=" + createTime + ", endDate=" + endDate
                + ", id=" + id + ", introduction=" + introduction + ", meta=" + meta + ", name="
                + name + ", siteDomain=" + siteDomain + ", startDate=" + startDate + ", status="
                + status + ", tenant=" + tenant + ", visits=" + visits + "]";
    }
}
